<template>
  <div class="search-header">
    <div class="back" @click="backHandler">
      <i class="iconfont">&#xe627;</i>
    </div>
    <div class="input-field"><input type="text"></div>
    <div><i class="iconfont">&#xe641;</i></div>
  </div>
</template>

<script>
export default {
  name: 'SearchHeader',
  created () {
    console.log(this)
  },
  methods: {
    backHandler () {
      // 编程式导航，实现后退
      this.$router.back()
    }
  }
}
</script>

<style lang="scss" scoped>
  .search-header{
    display: flex;
    align-items: center;
    height: 60px;
    .back {
      width: 60px;
      text-align: center;
    }
    .input-field{
      flex: 1;
    }
  }
</style>
